package com.zhiyou100.entity;

import java.io.Serializable;

/**
 * teacher
 *
 * @author 杨磊
 */
public class Teacher implements Serializable {
    private static final long serialVersionUID = 1L;
    private Integer tid;
    private String tname;
    private String tsubject;
    private String tpwd;

    public Integer getTid() {
        return tid;
    }

    public void setTid(Integer tid) {
        this.tid = tid;
    }

    public String getTname() {
        return tname;
    }

    public void setTname(String tname) {
        this.tname = tname;
    }

    public String getTsubject() {
        return tsubject;
    }

    public void setTsubject(String tsubject) {
        this.tsubject = tsubject;
    }

    public String getTpwd() {
        return tpwd;
    }

    public void setTpwd(String tpwd) {
        this.tpwd = tpwd;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Teacher other = (Teacher) that;
        return (this.getTid() == null ? other.getTid() == null : this.getTid().equals(other.getTid()))
                && (this.getTname() == null ? other.getTname() == null : this.getTname().equals(other.getTname()))
                && (this.getTsubject() == null ? other.getTsubject() == null : this.getTsubject().equals(other.getTsubject()))
                && (this.getTpwd() == null ? other.getTpwd() == null : this.getTpwd().equals(other.getTpwd()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTid() == null) ? 0 : getTid().hashCode());
        result = prime * result + ((getTname() == null) ? 0 : getTname().hashCode());
        result = prime * result + ((getTsubject() == null) ? 0 : getTsubject().hashCode());
        result = prime * result + ((getTpwd() == null) ? 0 : getTpwd().hashCode());
        return result;
    }

    @Override
    public String toString() {
        return getClass().getSimpleName() +
                " [" +
                "Hash = " + hashCode() +
                ", tid=" + tid +
                ", tname=" + tname +
                ", tsubject=" + tsubject +
                ", tpwd=" + tpwd +
                ", serialVersionUID=" + serialVersionUID +
                "]";
    }
}